package com.zg.api.domain.vo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.zg.common.core.vo.BaseVo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * <p>Description: </p>
 *
 * @author zhanfeng.liang
 * @since 2025/6/16 20:13
 */

@Data
public class ApiInfoVo  extends BaseVo {

    private Long id;

    /**
     * API名称
     */
    @ApiModelProperty(value = "API名称", required = true)
    private String apiName;

    /**
     * API编码（唯一标识）
     */
    @ApiModelProperty(value = "API编号", required = true)
    private String apiCode;

    /**
     * 请求方式
     */
    @ApiModelProperty(value = "请求方式", required = true)
    private String method;

    /**
     * 请求URL
     */
    @ApiModelProperty(value = "请求URL", required = true)
    private String url;

    /**
     * 状态（1-启用，0-禁用）
     */
    private Integer status;

    /**
     * 所属分类ID
     */
    @ApiModelProperty(value = "所属分类", required = true)
    private Long categoryId;

    /**
     * 所属项目ID
     */
    @ApiModelProperty(value = "所属项目", required = true)
    private Long projectId;

    @ApiModelProperty(value = "备注")
    private String intro;

    @ApiModelProperty(value = "类别")
    private String categoryName;

    @ApiModelProperty(value = "所属项目")
    private String projectName;

    @ApiModelProperty(value = "所属服务")
    private String serviceName;

    /**
     * 版本号
     */
    @ApiModelProperty(value = "版本号", required = true)
    private String version;

    /**
     * 参数
     */
    @ApiModelProperty(value = "参数", required = true)
    private String param;

    /**
     * 参数
     */
    @ApiModelProperty(value = "header", required = true)
    private String header;

    /**
     * 示例
     */
    @ApiModelProperty(value = "示例", required = true)
    private String example;

    @ApiModelProperty(value = "创建日期")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", shape = JsonFormat.Shape.STRING, timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /**
     * 更新时间
     */
    @ApiModelProperty(value = "更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", shape = JsonFormat.Shape.STRING, timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;
}
